package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/*退货详情*/

@Entity
public class Tuihuoxiangqing {
    private int thxqId;//退货详情id
    private Integer thcpNum;//退货产品数量
    private BigDecimal thcpPrice;//退货产品金额
    private Productt productt;//产品对象（产品id）
    private Tuihuo tuihuoByThId;//退货对象（退货id）
    private BigDecimal thcpXiaoji;//小计

    @Column(name = "thcp_xiaoji")
    public BigDecimal getThcpXiaoji() {
        return thcpXiaoji;
    }

    public void setThcpXiaoji(BigDecimal thcpXiaoji) {
        this.thcpXiaoji = thcpXiaoji;
    }

    @Id
    @Column(name = "thxq_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getThxqId() {
        return thxqId;
    }

    public void setThxqId(int thxqId) {
        this.thxqId = thxqId;
    }


    @Basic
    @Column(name = "thcp_num", nullable = true, precision = 0)
    public Integer getThcpNum() {
        return thcpNum;
    }

    public void setThcpNum(Integer thcpNum) {
        this.thcpNum = thcpNum;
    }

    @Basic
    @Column(name = "thcp_price", nullable = true, precision = 0)
    public BigDecimal getThcpPrice() {
        return thcpPrice;
    }

    public void setThcpPrice(BigDecimal thcpPrice) {
        this.thcpPrice = thcpPrice;
    }


    @ManyToOne
    @JoinColumn(name = "productt_id", referencedColumnName = "productt_id")
    public Productt getProductt() {
        return productt;
    }

    public void setProductt(Productt productt) {
        this.productt = productt;
    }

    @ManyToOne
    @JoinColumn(name = "th_id", referencedColumnName = "th_id")
    public Tuihuo getTuihuoByThId() {
        return tuihuoByThId;
    }

    public void setTuihuoByThId(Tuihuo tuihuoByThId) {
        this.tuihuoByThId = tuihuoByThId;
    }
}
